-- GENERATED SPELL FOR [Bound Water Elemental] --


function spell0_30419(pUnit, Event) --@Water Bolt,n/a--
pUnit:FullCastSpellOnTarget(56862,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30419', 2500, 1)
end

function spell1_30419(pUnit, Event) --@Water Spout,n/a--
pUnit:FullCastSpellOnTarget(39207,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30419', 544, 1)
end

function spell2_30419(pUnit, Event) --@Water Spout,n/a--
pUnit:FullCastSpellOnTarget(35735,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30419', 561, 1)
end

function Sorts_30419(pUnit, Event)
local choix_sorts_30419 = math.random(0, 2)
if choix_sorts_30419 == 0 then
pUnit:RegisterEvent('spell0_30419', 1, 1)
end
if choix_sorts_30419 == 1 then
pUnit:RegisterEvent('spell1_30419', 1, 1)
end
if choix_sorts_30419 == 2 then
pUnit:RegisterEvent('spell2_30419', 1, 1)
end
end

function mob30419_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30419', math.random(1500, 3000), 1)
end

function mob30419_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30419_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30419_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30419, 1, 'mob30419_Action')
RegisterUnitEvent(30419, 2, 'mob30419_Leave')
RegisterUnitEvent(30419, 3, 'mob30419_Kill')
RegisterUnitEvent(30419, 4, 'mob30419_Die')
